package sh.action;

import com.opensymphony.xwork2.ActionSupport;

import sh.model.User;
import sh.service.UserService;
import sh.service.impl.UserServiceImpl;

public class LoginAction extends ActionSupport{
	private User user;
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@Override
	public String execute() throws Exception {
		UserService userService = new UserServiceImpl();
		if(userService.myLogin(user)){
			return super.execute();
		}else{
			return "fail";
		}
		
	}
	public String show() throws Exception{
		return "success";
	}
}
